package com.atwisdom.star.core.bsl.functionClass;

import com.atwisdom.star.common.vo.ResultInfo;
import com.atwisdom.star.exception.pojo.BusinessException;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;

public interface FileManageService {
    /**
     * 多文件上传
     * @param files 参数
     * @return 返回值
     */
    public ResultInfo<?> uploadFiles(@RequestParam MultipartFile[] files) throws BusinessException;

    /**
     * 单文件上传
     * @param file 参数
     * @return 返回值
     */
    public ResultInfo<?> uploadFile(@RequestParam MultipartFile file) throws BusinessException;

    /**
     * 下载文件
     * @param param 文档参数
     * @return 返回值
     */
    ResultInfo<?>  downloadFileBase64(Map<String, String> param) throws BusinessException;

    /**
     * 下载文件
     * @param param 文档参数
     * @param response 文档参数
     * @param request 文档参数
     * @return 返回值
     */
   void downloadFile(Map<String, String> param, HttpServletResponse response, HttpServletRequest request) throws BusinessException;

    /**
     * 删除文件
     * @param param 路径
     * @return 返回值
     */
    public ResultInfo<?> deleteFile(Map<String, String> param) throws BusinessException;
}
